package com.abaaba.project2.controller.wxcontroller;

import com.abaaba.project2.bean.vo.BaseRespVo;
import com.abaaba.project2.bean.vo.WxUserIndexVo;
import com.abaaba.project2.service.WxUserService;
import com.abaaba.project2.util.UserIdUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.SessionAttribute;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/wx/user")
public class WxUserController {
    @Autowired
    WxUserService wxUserService;

    @RequestMapping("/index")
    public BaseRespVo getUserIndex() {
        WxUserIndexVo wxUserIndexVo = wxUserService.getUserIndex(UserIdUtil.getUserId());
        return BaseRespVo.ok(wxUserIndexVo);
    }
}
